<template>
  <el-dialog
    title="查看单位信息"
    align="center"
    :visible="dialogVisible"
    @close="close"
    v-if="data"
    width="60%"
  >
    <div style="padding: 20px;background-color: white;">
      <div>
        <el-row>
          <el-col :span="24" style="text-align: left;">
            <div
              class="grid-content bg-purple-dark"
              style="background-color: #F6F6F6;padding: 10px;"
            >
              <b>基本信息</b>
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="8">
            <div class="grid-content bg-purple txt-left">
              <b>隶属类别：</b>省直部门及所属单位
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="8">
            <div class="grid-content bg-purple txt-left">
              <b>隶属类型：</b>
              {{ this.tableData.tagName }}
            </div>
          </el-col>
          <el-col :span="8">
            <div class="grid-content bg-purple-light txt-left">
              <b>上级单位:</b>
              {{ this.tableData.parentName}}
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="8">
            <div class="grid-content bg-purple txt-left">
              <b>单位名称：</b>
              {{ this.tableData.companyName }}
            </div>
          </el-col>
          <el-col :span="8">
            <div class="grid-content bg-purple-light txt-left">
              <b>单位规格：</b>
              {{ this.tableData.xz}}
            </div>
          </el-col>
          <el-col :span="8">
            <div class="grid-content bg-purple txt-left">
              <b>单位性质：</b>
              {{ this.tableData.propName}}
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="8">
            <div class="grid-content bg-purple txt-left">
              <b>备注信息：</b>
              <!-- {{ this.tableData.bz}} -->
            </div>
          </el-col>
        </el-row>
        <br />
        <br />
        <el-row>
          <el-col :span="24" style="text-align: left;">
            <div
              class="grid-content bg-purple-dark"
              style="background-color: #F6F6F6;padding: 10px; "
            >
              <b>人员信息</b>
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="5">
            <div class="grid-content bg-purple txt-left">
              <b>单位实有人数：</b>
              {{ this.tableData.dwsynum}}人
            </div>
          </el-col>
          <el-col :span="5">
            <div class="grid-content bg-purple txt-left">
              <b>单位编制人数：</b>
              {{ this.tableData.rybznum}}人
            </div>
          </el-col>
          <el-col :span="5">
            <div class="grid-content bg-purple txt-left">
              <b>定向化岗位人数：</b>
              {{ this.tableData.dxhgwnum}}人
            </div>
          </el-col>
          <el-col :span="5">
            <div class="grid-content bg-purple txt-left">
              <b>离休干部人数：</b>
              {{ this.tableData.lxgbnum}}人
            </div>
          </el-col>
          <el-col :span="4">
            <div class="grid-content bg-purple txt-left">
              <b>退休干部人数：</b>
              {{ this.tableData.txgbnum}}人
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="12">
            <div class="grid-content bg-purple txt-left">
              <b>在职正省：</b>
              {{ this.tableData.zzzsnum}}人
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content bg-purple-light txt-left">
              <b>在职副省：</b>
              {{ this.tableData.zzfsnum}}人
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="12">
            <div class="grid-content bg-purple txt-left">
              <b>离休正省：</b>
              {{ this.tableData.lxzsnum}}人
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content bg-purple-light txt-left">
              <b>离休副省：</b>
              {{ this.tableData.lxfsnum}}人
            </div>
          </el-col>
        </el-row>
        <br />
        <el-row class="erow">
          <el-col :span="12">
            <div class="grid-content bg-purple txt-left">
              <b>退休正省：</b>
              {{ this.tableData.txzsnum}}人
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content bg-purple-light txt-left">
              <b>退休副省：</b>
              {{ this.tableData.txfsnum}}人
            </div>
          </el-col>
        </el-row>
        <br />
      </div>
    </div>
  </el-dialog>
</template>

<script>
import { axios } from "@/api/axios";
export default {
  props: {
    dialogVisible: {
      type: Boolean,
      default: true
    },
    data: {
      type: Object,
      default: true
    }
  },
  data: function() {
    return {
      CompanyRes: [],
      Carbz: [],
      companyId:"",
      data: {},
      tableData:""
    };
  },
  watch: {
    data() {
        if (this.data != null) {
          this.tableData = this.data.company;
        }
    }
  },
  methods: {
    close() {
      this.$emit("update:dialogVisible", false);
    },
    
  }
};
</script>
<style>
.txt-left {
  text-align: left;
  padding: 10px;
}
</style>
